package com.grape.zookeeper.config;

import org.springframework.stereotype.Service;

/**
 * 描述:UpdateInfoService  更新信息
 * @author: myx
 * @date: 2019/8/26 0026
 * Copyright © 2019-grape. All rights reserved.
 */
@Service
public class UpdateInfoService extends BaseZookeeper {
   public String updateInfo(String key, String value) {
      try {
         zkClient.writeData("/" + key, value);
         return "success";
      } catch (Exception e) {
         return "fail";
      }
   }
}